<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no"/>
<title>爱贝儿医</title>
<link rel="stylesheet" href="../style/common.css?<?=版本?>">
<link rel="stylesheet" href="../style/style.css" media="screen" type="text/css" />
<script type="text/javascript" src="../js/jquery.js"></script>
</head>
<?php

if($_POST)
{
    global $openId;
    $openId=$_SESSION['vo用户数据']['openID'];//id
    $bm=new CUI数据中心('Seller20CreateGroup',$openId);
    $群聊页面 = $bm->生成有效链接('websocket_qun',$_GET['state']);
    $c用户 = new C用户($bm->vo信息中心);
    $群id = $c用户->fc创建群组();
    if($群id)
    {
        echo "<script>alert('群组创建成功！');location.replace(location.href='".$群聊页面."&群id=".$群id."&父id=0');</script>";
    }
}
?>
<body>
     <form action="" method="post">
	<div class="creat_class_view">
            	<h2>请输入群名称：</h2>
                        <div class="creat_class_view_title"><input name="群名称" type="text" /></div>
                        <h2 style="margin-top:16px; ">群隐私设置：<span style="color: red;">（请注意！此处一经设置，不能更改！）</span></h2>
                        <div class="creat_class_view_more">
                        	<ul>
                            	<li>
                                	<h3>允许未认证的医生进入本群</h3>
                                    <div>
                                    	<input class='tgl tgl-light' id='cb1' name="审核" value="1" type='checkbox' checked>
                                        <label class='tgl-btn' for='cb1'></label>
                                    </div>
                                </li>
                                <div class="creat_class_view_more_line"></div>
                                <li>
                                	<h3>仅群主、助手可以推广二维码</h3>
                                    <div>
                                    	<input class='tgl tgl-light' id='cb2' name="成员可拉人" value="2"  type='checkbox'>
                                        <label class='tgl-btn' for='cb2'></label>
                                    </div>
                                </li>
                            </ul>
                        </div>
                <!--创建按钮-->
                <div class="creat_class_view_btn" style="display:none" id="submit_btn"><input name="" type="submit" value="创建群组" style="background:#DB3656;"/></div>
                <div class="creat_class_view_btn" id="button_btn"><input name="" type="button" value="创建群组" style="background:#ccc;"/></div>
    </div>
</form>

</div>
</body>
</html>
<script>
	//改变创建群组的颜色
            $(".creat_class_view_title input").keyup(function(){
                      if($(".creat_class_view_title input").val().length>0){
                        $("#button_btn").hide();
                        $("#submit_btn").show();
                    }else{
                        $("#submit_btn").hide();
                        $("#button_btn").show();
                    }
            });
             $("#button_btn").click(function(){
                      alert("请输入群名称~~")
            });

</script>